package com.zr.serviceimpl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zr.dao.LineDaoLPN;
import com.zr.service.LineServiceLPN;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@Service("ls")
public class LineServiceImplLPN implements LineServiceLPN{

	//属性注入
	@Resource
	private  LineDaoLPN lineDao;
	@Override
	public JSONObject getline(int page,int rows) {
		JSONObject j = new JSONObject();
		j.put("total", lineDao.getLineCount());
		j.put("rows", lineDao.getline(page, rows));
		return j;
	}
	@Override
	public JSONArray findTranSta1( String lineEndPoint) {
		// TODO Auto-generated method stub
		return lineDao.findTranSta1(lineEndPoint);
	}
	@Override
	public JSONArray findTranSta2(String lineStartPoint) {
		// TODO Auto-generated method stub
		return lineDao.findTranSta2(lineStartPoint);
	}
	@Override
	public boolean insertOrderLine(String loStart, String loStop, String loTransferStation1, String loTransferStation2,
			int orId) {
		// TODO Auto-generated method stub
		return lineDao.insertOrderLine(loStart, loStop, loTransferStation1, loTransferStation2, orId);
	}

}
